package org.tech4j.common.core.model.message;

import java.io.Serial;
import java.io.Serializable;

/**
 * @program: tech4j-common
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/1 21:11
 **/
public class MessageBody<T> implements Serializable {

    @Serial
    private static final long serialVersionUID = 4675068047700443327L;
    /**
     * 幂等号
     */
    private String identifier;

    /**
     * 消息体
     */
    private T body;


    public MessageBody() {
    }

    public MessageBody(String identifier, T body) {
        this.identifier = identifier;
        this.body = body;
    }

    public String getIdentifier() {
        return identifier;
    }

    public void setIdentifier(String identifier) {
        this.identifier = identifier;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }
}
